<?php
	if(!is_numeric($_POST['aco_Movimentado'])){die("Valor Incorrecto.");}
	$prresult=0;
		# DO PRC
		CONN('MYI');
		$GLOBALS['MYI']->multi_query("CALL `fn_accountmoviment`({$_POST['acoAccount']},0,2,'{$sysTime}','{$_POST['aco_ValueDate']}',{$_SESSION[$SESSID]},{$_POST['aco_Movimentado']},@prResult); SELECT @prResult;");
		 do {$GLOBALS['MYI']->next_result();
			if ($result = $GLOBALS['MYI']->store_result()) {
				while ($row = $result->fetch_row()) {
					if($row[0]==2){$prresult=1;}else{$prresult=0;}
				}
				$result->free();
			}
		} while ($GLOBALS['MYI']->more_results());
		$GLOBALS['MYI']->close();
		## END PRC
	if($prresult==1){
	echo '<div class="Confirm">Concluido.</div>';
	} else {
	echo '<div class="Error">Erro.</div>';
	}
?>